package edu.gatech.ealf.config;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JColorChooser;

import edu.gatech.ealf.components.ColorSwatch;

public class ColorChooserActionListener implements ActionListener {

    private JColorChooser colorChooser;
    private ColorSwatch colorSwatch;
    
    public ColorChooserActionListener(JColorChooser colorChooser, ColorSwatch colorSwatch){
        this.colorChooser = colorChooser;
        this.colorSwatch = colorSwatch;
    }
    
    public void actionPerformed(ActionEvent e) {
        colorSwatch.setColor(colorChooser.getColor());
    }

}
